package com.soboot.datasource.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;

import java.util.List;

/**
 * @Author:
 * @createTime: 2022年09月19日 17:18:46
 * @version:
 * @Description: 自定义sqlInjector
 * @Copyright:
 */
public class BaseLogicSqlInjector extends DefaultSqlInjector {

    /**
     * 增加列表跟分页sql
     * @return
     */
    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        List<AbstractMethod> methodList = super.getMethodList(mapperClass);
        methodList.add(new SelectListDataScope());
        methodList.add(new SelectPageDataScope());
        return methodList;
    }
}
